<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- examples.qdoc -->
  <title>SQL Examples | Qt 5.14</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="index.html">Qt 5.14</a></td><td >SQL Examples</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.14.2 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">SQL Examples</h1>
<span class="subtitle"></span>
<!-- $$$examples-sql.html-description -->
<div class="descr"> <a name="details"></a>
<p class="centerAlign"><img src="images/sql-examples.png" alt="" /></p><p>Qt provides extensive database interoperability, with support for products from both open source and proprietary vendors.</p>
<p>SQL support is integrated with Qt's model/view architecture, making it easier to provide GUI integration for your database applications.</p>
<div class="table"><table class="annotated">
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtsql/qtsql-books-example.html">Books</a></p></td><td class="tblDescr"><p>Shows how to use Qt SQL classes with a model/view framework</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtsql/qtsql-cachedtable-example.html">Cached Table Example</a></p></td><td class="tblDescr"><p>Cached Table example shows how a table view can be used to access a database, caching any changes to the data until the user explicitly submits them using a push button</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtsql/qtsql-drilldown-example.html">Drill Down Example</a></p></td><td class="tblDescr"><p>Drill Down example shows how to read data from a database as well as submit changes, using the QSqlRelationalTableModel and QDataWidgetMapper classes</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtsql/qtsql-masterdetail-example.html">Master Detail Example</a></p></td><td class="tblDescr"><p>Master Detail Example shows how to present data from different data sources in the same application. The album titles, and the corresponding artists and release dates, are kept in a database, while each album's tracks are stored in an XML file</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtsql/qtsql-querymodel-example.html">Query Model Example</a></p></td><td class="tblDescr"><p>Query Model example shows how to make customized versions of data obtained from a SQL query, using a model that encapsulates the query and table views to display the results</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtsql/qtsql-relationaltablemodel-example.html">Relational Table Model Example</a></p></td><td class="tblDescr"><p>Relational Table Model example shows how to use table views with a relational model to visualize the relations between items in a database</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtsql/qtsql-sqlbrowser-example.html">SQL Browser</a></p></td><td class="tblDescr"><p>SQL Browser example shows how a data browser can be used to visualize the results of SQL statements on a live database</p></td></tr>
<tr class="even topAlign"><td class="tblName"><p><a href="../qtsql/qtsql-sqlwidgetmapper-example.html">SQL Widget Mapper Example</a></p></td><td class="tblDescr"><p>SQL Widget Mapper example shows how to use a map information from a database to widgets on a form</p></td></tr>
<tr class="odd topAlign"><td class="tblName"><p><a href="../qtsql/qtsql-tablemodel-example.html">Table Model Example</a></p></td><td class="tblDescr"><p>Table Model example shows how to use a specialized SQL table model with table views to edit information in a database</p></td></tr>
</table></div>
<p>Examples marked with an asterisk (*) are fully documented.</p>
</div>
<!-- @@@examples-sql.html -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2020 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
